package com.airlenet.dubbo.demo.api;

import java.io.Serializable;

public interface HelloApi {


    public String sayHello(String hi);

    public HelloResponse sayObject(HelloRequest req);


    public static class HelloResponse implements Serializable{
        private boolean success;
        private String uuid;
        private String result;

        public HelloResponse(boolean success, String uuid, String result) {
            this.success = success;
            this.uuid = uuid;
            this.result = result;
        }

        @Override
        public String toString() {
            return "HelloResponse{" +
                    "success=" + success +
                    ", uuid='" + uuid + '\'' +
                    ", result='" + result + '\'' +
                    '}';
        }
    }

    public static class HelloRequest implements Serializable {
        private String uuid;
        private String message;

        public HelloRequest(String uuid, String message) {
            this.uuid = uuid;
            this.message = message;
        }

        public String getUuid() {
            return uuid;
        }

        public String getMessage() {
            return message;
        }

        @Override
        public String toString() {
            return "HelloRequest{" +
                    "uuid='" + uuid + '\'' +
                    ", message='" + message + '\'' +
                    '}';
        }
    }
}
